#include<iostream>
int main()
{
	int a,ge,shi,bai,qian,wan;
	scanf("%d",&a);
	if((a/10000)>0)
		{
			printf("5\n");
			ge=a%10; 
			shi=(a%100)/10;
			bai=(a%1000)/100;
			qian=(a%10000)/1000;
			wan=a/10000;
			printf("%d %d %d %d %d\n",wan,qian,bai,shi,ge);
			printf("%d%d%d%d%d\n",ge,shi,bai,qian,wan);
		}
	else if((a/1000)>0)
		printf("4\n");
	else if((a/100)>0)
		printf("3\n");
	else if((a/10)>0)
		printf("2\n");
	else
		printf("1\n");
	system("pause");
	return 0;
} 
